package com.code.day20;

import java.io.FileWriter;
import java.io.IOException;

public class Demo08FileWriter {
    public static void main(String[] args) throws IOException {
        method01();
    }

    public static void method01() throws IOException {
        FileWriter fw = new FileWriter("day20_io/4.txt",true);
        fw.write("我和我的祖国\n");
        fw.write("一刻也不能分割\n");
        //刷新缓冲区
        fw.flush();
        fw.write("我是超级刘大胆\n");
        fw.flush();
        fw.close();
        //fw.write("哈哈哈");
    }
}
